package cc.mcggdd.leah.boot.stock.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
import java.time.LocalDate;

import jakarta.validation.constraints.*;

/**
 * 持仓管理表单对象
 *
 * @author 
 * @since 2025-02-13 09:38
 */
@Getter
@Setter
@Schema(description = "持仓管理表单对象")
public class StockHoldingForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "股票代码")
    @NotBlank(message = "股票代码不能为空")
    @Size(max=16, message="股票代码长度不能超过16个字符")
    private String code;

    @Schema(description = "股票名称")
    @NotBlank(message = "股票名称不能为空")
    @Size(max=32, message="股票名称长度不能超过32个字符")
    private String name;

    @Schema(description = "收益额")
    private BigDecimal income;

    @Schema(description = "收益率")
    private BigDecimal yield;

    @Schema(description = "建仓日期")
    private LocalDate startDate;

    @Schema(description = "清仓日期")
    private LocalDate endDate;

    @Schema(description = "状态")
    @Size(max=5, message="状态长度不能超过5个字符")
    private String status;

}
